Vogon15.zip contains the source code for the Vogon Poetry Web Browser, a demo platform for the Webster HYTML OCX. It is described near the bottom of this document. ======================================================================= WEBSTER.OCX BETA BUILD 913 For Windows NT and Windows 95 7/30/95 WEBSTER.DLL BETA BUILD 913 For Windows 3.1 The Webster OLE2 Custom Control ------------------------------- An HTML-Aware OCX From Trafalmador ---------------------------------- What Is It ? ------------ The Webster OCX is a drop-in HTML display and Web browsing solution, a WWW client as an OLE control. Webster can retrieve, interpret and display HTML pages (including forms and images), and respond to hyperlink mouse clicks. It differs from other Web browsers in that it is not a stand-alone application but rather a tool for application developers. When embedded in an OCX-capable container, Webster exposes properties, methods and events which allow the container to maintain a high degree of control over Webster actions. Using a language such as Basic (or C++), you can monitor user actions and approve, veto or replace any clicked URL. Browsing sessions may be fully automated for applications such as slide shows or web-walkers, or merely guided by substituting, suggesting alternatives or disallowing access to certain URLs. Alternatively, a container may remain uninvolved, allowing the user to perform the usual point-and-click Web browsing. Possible applications include: o An automated display or kiosk. o A Web search robot, able to perform network tree walks and retrieve documents based on specific criteria. o A guided browser, which directs the user to pre-selected destinations yet allows side excursions inside the permitted domain. o An HTML reader for documents distributed on CD-ROM. o A Reader for an HTML forms and images database. o Display clickable images in any application. o Build a better Web browser, adding infrastructure and features like timer-driven events and specialized address book creation on top of Webster's native capabilities (see Vogon Poetry). Who Needs It ? -------------- The target audience for Webster is the application developer who needs to incorporate a Web browser (or just an HTML display) into an MS-Windows product, without resorting to heavyweight OLE solutions like MS-WORD. The OCX is implemented as an in-process DLL, which is both quick and compact. Most future program development environments will support the OCX format, which is being promoted by a very large company. The 32-bit webster.ocx can be used under Windows NT and Windows 95 (being multithreaded, it cannot run under Win32s). It is optimized for slow modems. The 16-bit webster.dll can be run under Windows 3.1x. It differs from the 32-bit version in that it is not (yet) net-aware, so it only accepts local "file:" URLs. Current State: Beta ------------------- o 32-bit multithreaded implementation / 16-bit local-only version. o One-click local disk browsing. o HTML 2.0 implemented, many 3.0 and de-facto standard extensions. o HTTP 1.0 protocol over winsock. o Can save an HTML page to disk, including images, and load from disk. o A simple MDI browser (Vogon Poetry) is included in the Beta kit. Intended as a starting point for Webster-based browser development, it demonstrates how to use Webster in an MFC/C++ app. Please let us know of any bugs you find or improvements you would like to see. The beta kit may be freely redistributed. Installation ============ The Beta kits come in 16- and 32-bit flavors, each of which has a full package and an update kit. Download the full package only once, then just retrieve the update kit for subsequent releases. All kits can be found at our Web page or ftp site. 32-bit Kit: ----------- The complete distribution kit is in wbstrXXX.zip, with XXX being the build number. If you already have all the DLLs listed below (they are MSVC 2.1 redistributables), you can download wbstrXXXnodlls.zip instead. The wbstrXXX.zip distribution kit contains the following files: o webster.ocx The 32-bit Webster OCX control o HotList.htm Sample hotlist o vogon32.exe The Vogon Poetry browser o regsvr32.exe Use to register oc30.dll o html.dfa Webster data file o html.llr Webster data file o mfc30.dll SYSTEM DLL o mfco30.dll SYSTEM DLL o mfcn30.dll SYSTEM DLL o mfcan32.dll SYSTEM DLL o oc30.dll SYSTEM DLL o msvcrt20.dll SYSTEM DLL o webster.odl Declares Webster properties, events and methods o readme.txt This file 16-bit Kit: ----------- The complete distribution kit is in wb16-XXX.zip, with XXX being the build number. If you already have all the DLLs listed below (they are MSVC 1.52 redistributables), you can download wb16uXXX.zip instead. The wb16-XXX.zip distribution kit contains the following files: o webster.dll The 16-bit Webster OCX control o vogon16.exe The Vogon Poetry browser o regsvr.exe Use to register oc25.dll o html.dfa Webster data file o html.llr Webster data file o oc25.dll SYSTEM DLL o compobj.dll SYSTEM DLL (OLE 2) o ole2.dll SYSTEM DLL (OLE 2) o mfcoleui.dll SYSTEM DLL o ole2.reg SYSTEM DLL (OLE 2) o ole2conv.dll SYSTEM DLL (OLE 2) o ole2disp.dll SYSTEM DLL (OLE 2) o ole2nls.dll SYSTEM DLL (OLE 2) o ole2prox.dll SYSTEM DLL (OLE 2) o stdole.tlb SYSTEM (OLE 2) o storage.dll SYSTEM DLL (OLE 2) o typelib.dll SYSTEM DLL (OLE 2) o webster.odl Declares Webster properties, events and methods o vb_props.txt Property list for VB3 o readme.txt This file Both Kits: ---------- Create a directory in which to unzip the files. After unzipping, copy all the files marked SYSTEM to your Windows system32 (32-bit) or system (16-bit) subdirectory. Webster.ocx (or webster.dll) may be kept in any directory, the only strict requirement is that html.dfa and html.llr reside in the same directory as the OCX (or DLL). An OLE control must be entered in the system registry before it can be used. To register webster.ocx or webster.dll, run vogon32.exe or vogon16.exe respectively and select Register Webster from the File menu, then select webster.ocx (or webster.dll) in the dialog box. You only need to do this once. Note that the same menu offers an Unregister Webster option, for complete uninstallation. If you need to move the OCX to a different directory, unregister it and re- register from the new location. Remember to move html.dfa and html.llr along with the OCX (or DLL). You must also register oc30.dll (for webster.ocx) or oc25.dll (for webster.dll): use regsvr32.exe or regsvr.exe, respectively. This program also has an uninstall feature. Test the control using the Vogon Poetry browser described below. MSVC 2.2/1.52 owners may also exercise the control using the Test Container from the CDK (tstcon32.exe or tstcon16.exe). Beta Release Notes: ------------------- Beta 913: Hidden/revealed pages, basic authentication, HTTP proxy support, source, pure text and hyperlink extraction methods, load completion event, HTTP binary download. Beta 912: Status page is automatically displayed instead of a blank page, improved forms POST support. Beta 911: HTTP 1.0 implemented. Copy, cut and paste (^C, ^X and ^V) are available in all edit controls (forms, ISINDEX). Status page has a dismiss-from-cache button (method will follow). The Vogon Poetry browser now demonstrates how to handle the DoClickURL event, which allows the container to determine the response to every hyperlink click. Beta 910: Implements a status display, support for image-only pages, HTML source display and pure-text save. The Vogon Poetry browser now has a slide show/guided tour feature. Beta 909: Added: horizontal scroll bars. PROMPT attribute support for ISINDEX tags. Direct URL entry in the directory page. URL copy to clipboard on right mouse click. New 16/32-bit Vogon Poetry browser. Beta 908: Cosmetic: improved repaint, introduction of our Web site. Beta 907: Hyperlink jumps allowed without canceling load. Corrected handling of raw text files. Beta 906: Forms fully functional, including multiple forms and multiple Submit buttons per form. BASE tag supported (overridable for file: scheme via the IgnoreBaseInFile property). Beta 905: History lists implemented. Color selection and tiled-image background supported. Beta 904: ISINDEX tag supported, for simple searches. Beta 903: A directory browsing feature has been added (the "D" button). Parallel 16-bit OCX is available for beta test. Beta 902: When a control is newly created, the default setting for the HomePage property points to the file HotList.htm in the current directory. The Home button displays it. Beta 901: The Click event has two arguments, the URL clicked by the user and a Cancel boolean. If the container ignores the event, the URL is loaded. The container can set Cancel to TRUE, causing the user request to be ignored, or leave Cancel FALSE and alter the URL argument resulting in a load of the modified URL. The container (or user) may also initiate a page load by setting the PageURL property. The Vogon Poetry Browser ------------------------ The Vogon Poetry browser is not a work of art, just a quick-and-dirty demonstration platform for Webster. It simply embeds a single Webster OCX in each MDI child window, and creates a dispatch function for handling events. Vogon demonstrates Webster's basic display, browsing and event features only, and is not a full-blown OLE control container. Vogon Poetry exhibits the usual MDI app characteristics, including the ability to serialize a document. A Vogon document contains all the persistent control properties. You can use the Webster property pages to select the initial URL and other properties (the "W" on the Vogon toolbar button invokes the properties dialog box), then File | Save the configuration as a .vog document. NEW IN BETA 910: A simple slide show capability has been added to Vogon Poetry. Select View | Slide Show Setup (or the corresponding toolbar button) to show the Slide Show Setup dialog box, then click Add to add the current page URL to the end of the slide show list. Toggle the automated URL walk using View | Slide Show or the corresponding toolbar button. When you create a .vog document (File | Save) the slide list is included, and can be reloaded with File | Open. NEW IN BETA 911: A URL filter feature demonstrates how to respond to the DoClickURL event and approve, modify or veto the selected URL. New in BETA 913: Added demos for hidden pages, text and hyperlink extraction. Vogon is an MSVC 1.52/2.1 application which can be built for either 16- or 32-bit platforms. The MFC/C++ source code is available in vogonXXx.zip (XXx is the version designation) and may be freely modified and distributed. MFC/C++ Notes ------------- Vogon Poetry source code is a starting point for implementing your own application, with webster.h providing a type-safe interface definition. A more complete solution for OCX container implementation is promised in a future version of MFC. Visual Basic 3 Notes -------------------- The 16-bit webster.dll can be used in VB3 to view local HTML files and images. Here is the cookbook: 1. Insert the MSOLE control into your form (make it a reasonably large rectangle). VB immediately pops up the "Insert Object" dialog. 2. Check "Create New" and select "Webster HTML Control" in the "Insert Object" list box. If you don't see "Webster HTML Control", you probably need to register Webster - see the installation instructions. 3. Click on the resulting control to select it, then hit F4 to bring up the "Properties" dialog. Set the first property, "AutoActivate" to "1 - GetFocus". All other defaults are OK. 4. Hit F5 to run. To select a new page programatically, use a statement of the form OLE1.Object.PageURL = "file:///C:/MyPage.htm" ... where OLE1 is your MSOLE control name, and "Object" is constant. You can read or write all properties using this syntax. The file vb_props.txt lists the available Webster properties and methods. Trafalmador Software ==================== email: tanny@netcom.com WWW: http://www.vpm.com/trafalmador/ ftp: ftp.netcom.com/pub/ta/tanny/ -----------------------------------------------------------------------